package org.jeecg.modules.kuner.useruimestatement.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.kuner.useruimestatement.entity.KrUserTimeStatement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.kuner.vipgoodbase.entity.KrVipGoodBase;

/**
 * @Description: 用户次数流水记录
 * @Author: jeecg-boot
 * @Date: 2025-02-19
 * @Version: V1.0
 */
public interface KrUserTimeStatementMapper extends BaseMapper<KrUserTimeStatement> {

    /**
     * 查询用户剩余次数
     *
     * @param userId 用户信息
     * @return 剩余次数
     */
    @Select("select sum(modify_time) from kr_user_time_statement where user_id=#{userId}")
    Date selectUserTime(String userId);


}
